package com.horizon.controller;

import com.horizon.service.ConfigureDbService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author horizon
 */
@RestController
public class IndexController {

    @Resource
    private ConfigureDbService configureDbService;

    @RequestMapping("/snowflake/info")
    public Object querySnowflakeInfo() {
        return configureDbService.getIdWorker().nextId();
    }
}
